<template>
	<div>
		<div>
			<div>
				<div style="margin-bottom: 10px;display: inline-block;width: 100%;">
					<div style="position: relative;display: inline-block;">
						<span>师傅昵称：</span>
						<el-input style="width: 200px;" @keydown.enter.native="phoneSelect" placeholder="请输入师傅昵称"
							v-model="nickNameT">
						</el-input>&nbsp;&nbsp;
					</div>
					<span style="display: inline-block;text-align: right;">城市：</span>
					<el-cascader style="width:30%" size="large" :options="options" ref="cascaderAddr"
						v-model="storeAddress" :placeholder="storeAddre" @change="handleChange55" :value="storeAddre">
					</el-cascader>&nbsp;&nbsp;&nbsp;&nbsp;
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document"
						@click="phoneSelect">刷新</el-button>
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleans">重置
					</el-button>
				</div>

			</div>
		</div>
		<div>
			<div id="container" style="width:95%;height:80vh;margin-left: 2.5%;position: relative;"
				v-loading="tableDataLoadingDt"></div>
		</div>
		<div>
			<!-- 待服务订单 -->
			<el-dialog title="师傅列表" :visible.sync="dialogFormVisible2" center width="70%" style="z-index: 1000;">
				<div style="margin:2% 0;display: inline-block;">
					<span>手机号:</span>
					<el-input style="width: 150px;" @keydown.enter.native="selectU" clearable placeholder="请输入手机号"
						v-model="phoneU"></el-input>
				</div>
				<div style="margin:2% 0;display: inline-block;">
					<span>昵称:</span>
					<el-input style="width: 150px;" @keydown.enter.native="selectU" clearable placeholder="请输入昵称"
						v-model="campus"></el-input>
				</div>
				<div style="display: inline-block;">
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="selectU">查询
					</el-button>
					<el-button style="margin-left:15px;" size="mini" type="primary" icon="document" @click="cleansU">重置
					</el-button>
				</div>
				<el-table v-loading="tableDataLoadingU" :data="userData.list">
					<el-table-column prop="userId" label="编号" width="80">
					</el-table-column>
					<el-table-column prop="nickName" label="用户昵称" width="120">
						<template slot-scope="scope">
							　<span style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row.userId)"
								v-text="scope.row.nickName"></span>
						</template>
					</el-table-column>
					<el-table-column prop="avatar" label="用户头像" width="100">
						<template slot-scope="scope">
							　　<img v-if="scope.row.avatar && scope.row.avatar!=''" :src="scope.row.avatar" width="40"
								height="40" />
							<span v-else>暂无图片</span>
						</template>
					</el-table-column>
					<el-table-column prop="phone" label="手机号">
					</el-table-column>
					<el-table-column prop="createTime" label="创建时间" width="180">
					</el-table-column>
					<el-table-column label="操作" prop="id" width="100" fixed='right' align="center">
						<template slot-scope="scope">
							<el-button size="mini" type="primary" @click="userBtns(scope.row)">确认
							</el-button>
						</template>
					</el-table-column>
				</el-table>
				<div style="text-align: center;margin-top: 10px;">
					<el-pagination @size-change="handleSizeChangeU" @current-change="handleCurrentChangeU"
						:page-sizes="[10, 20, 30, 40]" :page-size="limit1" :current-page="page1"
						layout="total,sizes, prev, pager, next,jumper" :total="userData.totalCount">
					</el-pagination>
				</div>
			</el-dialog>
			<!-- 订单列表 -->
			<el-dialog title="订单列表" :visible.sync="dialogFormVisible" center width="80%">

				<el-table v-loading="tableDataLoadingU" :data="userData.records">
					<el-table-column fixed prop="indentId" label="编号" width="80">
					</el-table-column>
					<el-table-column prop="indentId" label="下单人昵称" width="120">
						<template slot-scope="scope">
							<div style="color: #4f9dec;cursor: pointer;" @click="updates(scope.row.userId)">
								{{scope.row.shipUserName}}
							</div>
						</template>
					</el-table-column>
					<el-table-column prop="shipUserPhone" label="下单手机号"></el-table-column>
					<el-table-column prop="indentType" label="订单类型">
						<template slot-scope="scope">
							<div v-if="scope.row.indentType==1">即时代驾</div>
							<div v-if="scope.row.indentType==2">朋友代叫</div>
							<div v-if="scope.row.indentType==3">预约代驾</div>
						</template>
					</el-table-column>
					<el-table-column prop="indentNumber" label="订单号"></el-table-column>
					<el-table-column prop="shipAddressDetail" label="乘客信息" width="200">
						<template slot-scope="scope">
							<div>
								<div>乘客姓名:{{scope.row.customName}} </div>
								<div>乘客电话: {{scope.row.customPhone}}</div>
							</div>
						</template>
					</el-table-column>
					<el-table-column prop="shipAddressDetail" label="下单人信息" width="200">
						<template slot-scope="scope">
							<div>
								<div>下单人姓名:{{scope.row.shipUserName}} </div>
								<div>下单人电话: {{scope.row.shipUserPhone}}</div>
							</div>
						</template>
					</el-table-column>
					<el-table-column prop="deilveryAddressDetail" label="下单地址" width="200">
						<template slot-scope="scope">
							<div>{{scope.row.shipAddress}}</div>
							<div>目的经纬度：{{scope.row.shipAddressLatitude}} {{scope.row.shipAddressLongitude}}</div>
						</template>
					</el-table-column>
					<el-table-column prop="deilveryAddressDetail" label="目的地址" width="200">
						<template slot-scope="scope">
							<div>{{scope.row.deliveryAddress}}</div>
							<div>目的经纬度：{{scope.row.deliveryAddressLatitude}} {{scope.row.deliveryAddressLongitude}}
							</div>
						</template>
					</el-table-column>
					<el-table-column prop="shipAddressDetail" label="师傅信息" width="200">
						<template slot-scope="scope">
							<div>
								<div>师傅姓名:{{scope.row.riderNickName}} </div>
								<div>师傅电话: {{scope.row.riderPhone}}</div>
							</div>
						</template>
					</el-table-column>
					<el-table-column prop="riderDistance" label="师傅距离起始/终点位置距离(米)" width="140">
					</el-table-column>

					<el-table-column prop="distance" label="预估总路程(公里)"></el-table-column>
					<el-table-column prop="indentBasicsMoney" label="基础价格">
					</el-table-column>
					<el-table-column prop="userScaleMoney" label="上级抽佣金额">
						<template slot-scope="scope">
							<div style="color: #f56c6c;cursor: pointer;" @click="updates(scope.row.userScaleUserId)">
								{{scope.row.userScaleMoney?scope.row.userScaleMoney:'0'}}
							</div>
						</template>
					</el-table-column>
					<el-table-column prop="userTwoMoney" label="上上级抽佣金额">
						<template slot-scope="scope">
							<div style="color: #f56c6c;cursor: pointer;" @click="updates(scope.row.userTwoUserId)">
								{{scope.row.userTwoMoney?scope.row.userTwoMoney:'0'}}
							</div>
						</template>
					</el-table-column>
					<el-table-column prop="platformMoney" label="平台收入">
					</el-table-column>
					<el-table-column prop="riderRewardMoney" label="师傅奖励金额">
					</el-table-column>
					<el-table-column prop="riderMoney" label="师傅收入">
					</el-table-column>
					<el-table-column prop="couponMoney" label="优惠券抵扣金额">
					</el-table-column>
					<el-table-column prop="indentMoney" label="支付金额">
						<template slot-scope="scope">
							<div style="color: #f56c6c;">
								{{scope.row.indentMoney?scope.row.indentMoney:'0'}}
							</div>
						</template>
					</el-table-column>
					<el-table-column prop="userFine" label="用户取消订单罚金">
					</el-table-column>
					<el-table-column prop="riderFine" label="师傅取消订单罚金">
					</el-table-column>
					<!-- <el-table-column prop="itemCodeFlag" label="是否有确认码">
						<template slot-scope="scope">
							<div v-if="scope.row.itemCodeFlag==1">没有收货码</div>
							<div v-if="scope.row.itemCodeFlag==0">有收货码</div>
						</template>
					</el-table-column> -->
					<el-table-column prop="remarks" label="备注">
					</el-table-column>
					<!-- <el-table-column prop="itemCode" label="确认码">
						<template slot-scope="scope">
							<div v-if="scope.row.itemCodeFlag==1">-</div>
							<div v-else>{{scope.row.itemCode}}</div>
						</template>
					</el-table-column> -->
					<el-table-column prop="modeOfPayment" label="支付方式">
						<template slot-scope="scope">
							<div v-if="scope.row.modeOfPayment==1">微信</div>
							<div v-if="scope.row.modeOfPayment==2">支付宝</div>
							<div v-if="scope.row.modeOfPayment==3">余额</div>
						</template>
					</el-table-column>
					<el-table-column prop="receivingTime" label="接单时间" width="160">
					</el-table-column>
					<el-table-column prop="finishTime" label="完成时间" width="160">
					</el-table-column>
					<el-table-column prop="createTime" label="创建时间" width="160">
					</el-table-column>

					<el-table-column prop="indentState" label="状态" fixed="right">
						<template slot-scope="scope">
							<div v-if="scope.row.indentState==0">待接单</div>
							<div v-if="scope.row.indentState==1">已接单</div>
							<div v-if="scope.row.indentState==2">进行中</div>
							<div v-if="scope.row.indentState==3">待支付</div>
							<div v-if="scope.row.indentState==4">已完成</div>
							<div v-if="scope.row.indentState==5">已取消</div>
						</template>
					</el-table-column>
				</el-table>
			</el-dialog>

		</div>
		<!-- <img src="../../assets/img/qishou.png" /> -->


	</div>
</template>

<script>
	import {
		jsonp
	} from 'vue-jsonp'
	import {
		provinceAndCityData,
		regionData,
		provinceAndCityDataPlus,
		regionDataPlus,
		CodeToText,
		TextToCode
	} from 'element-china-area-data'
	var geocoder, map, markersArray, infoWindow = [];
	export default {
		data() {
			return {
				limit: 10,
				page: 1,
				shopName1: '',
				shopId: '',
				shopName: '',
				openTime: '',
				closeTime: '',
				detailedAddress: '',
				shopLng: '',
				shopLat: '',
				percentage1: 0, //进度条
				img: [], //任务轮播图
				// img: '',
				classn: '',
				value: [],
				parentId: 0,
				parentIdnum: '',

				tableDataLoading: false,
				dialogFormVisible1: false,
				dialogFormVisible2: false,
				dialogFormVisible3: false,
				dialogFormVisible: false,
				typeDatas: {},
				typeDatas1: {},
				titles: '添加',
				// 地图相关
				longitude: '', //经度
				latitude: '', //维度
				loadingMap: true,
				BMap: '',
				map: '',
				geoc: '',
				keyword: '',
				showMap: false,
				pointLngLat: '',
				center: {
					lng: 108.948024,
					lat: 34.263161
				},
				lng: 108.948024,
				lat: 34.263161,
				storeAddress: [],
				storeAddre: '请选择城市',
				form: {
					province: '',
					city: '', //市
					district: '', //区
				},
				dialogImageUrl: [],
				dialogVisible: false,
				erweimaImg: '',
				activeName: 'first',
				shopTypeName: '',
				shopTypId: '',
				titles1: '',
				labels: [], //标签集合
				bq: '', //输入的标签名
				province: '',
				city: '', //市
				district: '', //区
				options: regionData,
				shopCover: '',
				shopTypenum: [],
				typeDatas2: [],
				shopType: '',
				geometries: [],
				center: '',
				map: '',
				lists: [],
				index1: 0,
				tableData: {},
				hospitalId: '',
				ordersNo: '',
				userName: '',
				type: '',
				marker: '',
				infoWindowList: [],
				typeNum: [{
						value: '',
						label: '全部'
					},
					{
						value: 1,
						label: '陪诊订单'
					},
					{
						value: 2,
						label: '陪护订单'
					},
				],
				userData: [],
				tableDataLoadingU: false,
				dialogFormVisible: false,
				limit1: 10,
				page1: 1,
				phone: '',
				campus: '',
				ordersId: '',
				pd: '',
				titles: '信息详情',
				dialogFormVisibleDel: false,
				detaDatle: {},
				datleIndex: 1,
				// 指派
				userData: {},
				phoneU: '',
				campus: '',
				ordersId: '',
				limit1: 10,
				page1: 1,
				dialogFormVisible: false,
				tableDataLoadingU: false,
				tableDataZd: [],
				laundryId: '',
				laundryIdU: '',
				nickNameT: '',
				tableDataLoadingDt: false,
			}
		},
		methods: {
			handleSizeChange(val) {
				this.limit = val
				this.dataSelectoder()
			},
			handleCurrentChange(val) {
				this.page = val
				this.dataSelectoder()
			},
			handleSizeChangeU(val) {
				this.limit1 = val;
				this.dataSelectUser()()
			},
			handleCurrentChangeU(val) {
				this.page1 = val;
				this.dataSelectUser()
			},
			//定位获得当前位置信息
			getMyLocation() {
				var geolocation = new qq.maps.Geolocation("ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75", "来点小收入");
				geolocation.getIpLocation(this.showPosition, this.showErr);
			},
			showPosition(position) {
				this.setMap();
			},
			showErr(e) {
				this.getMyLocation(); //定位失败再请求定位，测试使用
			},
			//位置信息在地图上展示
			setMap() {
				console.log('地图定位：', this.longitude, this.latitude, )
				var center = new TMap.LatLng(this.latitude, this.longitude);
				if (map) {
					map.destroy();
				}
				map = []
				infoWindow = []
				// 初始化地图
				map = new TMap.Map('container', {
					zoom: 13, // 设置地图缩放级别
					pitch: 30,
					center: center, // 设置地图中心点坐标
					// mapStyleId: "style1", //个性化样式
					baseMap: {
						type: 'vector',
						// features: ['base', 'building3d'], // 隐藏矢量文字
					},
				});


				// var center = new TMap.LatLng(this.latitude, this.longitude);
				// if (map) {
				// 	map.destroy();
				// }
				// map = []
				// infoWindow = []
				// // 初始化地图
				// map = new TMap.Map('container', {
				// 	zoom: 13, // 设置地图缩放级别
				// 	pitch: 30,
				// 	center: center, // 设置地图中心点坐标
				// 	// mapStyleId: "style1", //个性化样式
				// 	baseMap: {
				// 		type: 'vector',
				// 		features: ['base', 'building3d'], // 隐藏矢量文字
				// 	},
				// });
				// 师傅标记
				this.marker = new TMap.MultiMarker({
					map: map,
					styles: {
						default: new TMap.MarkerStyle({
							width: 66, // 宽度
							height: 66, // 高度
							anchor: {
								x: 46,
								y: 46
							}, // 锚点位置
							src: 'https://mapapi.qq.com/web/lbs/visualizationApi/demo/img/circle.png', // 标注点图片url或base64地址
							color: '#000', // 标注点文本颜色
							size: 14, // 标注点文本文字大小
							offset: {
								x: 0,
								y: 16
							}, // 标注点文本文字基于direction方位的偏移属性
						}),
					},
					geometries: this.geometries
				});
				/* if(this.infoWindowList && this.infoWindowList.length>0){
					for(var i in this.infoWindowList){
						var infoWindow=this.infoWindowList[i];
						infoWindow.close()
					}
				} */


				//初始化infoWindow
				console.log('this.geometries', this.geometries)
				// infoWindow.clear();
				for (var i in this.geometries) {
					infoWindow = new TMap.InfoWindow({
						map: map,
						position: new TMap.LatLng(this.geometries[i].datas.lat, this.geometries[i].datas.lng),
						offset: {
							x: 0,
							y: -32
						} //设置信息窗相对position偏移像素
					});
					// infoWindow.clears();//关闭信息窗
					// infoWindow.setContent('待服务数量：1'); //设置信息窗内容
					infoWindow.setContent('未完成订单：' + this.geometries[i].datas.indentCount); //设置信息窗内容
					infoWindow.open(); //初始信息窗开启
					//this.infoWindowList.push(infoWindow);
					// infoWindow.close(); //关闭信息窗
				}
				let that = this
				this.marker.on("click", function(evt) {
					console.log(evt.geometry)
					// that.hospitalId = evt.geometry.datas.artificerId
					that.zhuandan(evt.geometry.datas)
					that.dialogFormVisible = true
				})
				// 订单标记
				this.marker = new TMap.MultiMarker({
					map: map,
					styles: {
						default: new TMap.MarkerStyle({
							width: 25, // 宽度
							height: 35, // 高度
							anchor: {
								x: 16,
								y: 32
							}, // 锚点位置
							src: 'https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/markerDefault.png', // 标注点图片url或base64地址
							color: '#ff4949', // 标注点文本颜色
							size: 14, // 标注点文本文字大小
							offset: {
								x: 0,
								y: 16
							}, // 标注点文本文字基于direction方位的偏移属性
						}),
					},
					geometries: this.lists
				});
				for (var i in this.lists) {
					infoWindow = new TMap.InfoWindow({
						map: map,
						position: new TMap.LatLng(this.lists[i].datas.shipAddressLatitude, this.lists[i].datas
							.shipAddressLongitude),
						offset: {
							x: 0,
							y: -32
						} //设置信息窗相对position偏移像素
					});
					// infoWindow.clears();//关闭信息窗
					// infoWindow.setContent('待服务数量：1'); //设置信息窗内容
					infoWindow.setContent('下单用户：' + this.lists[i].datas.shipUserName); //设置信息窗内容
					infoWindow.open(); //初始信息窗开启
					//this.infoWindowList.push(infoWindow);
					// infoWindow.close(); //关闭信息窗
				}

				// let that = this
				this.marker.on("click", function(evt) {
					console.log(evt.geometry)
					// that.hospitalId = evt.geometry.datas.artificerId
					that.zhuandan(evt.geometry.datas)
					that.dialogFormVisible2 = true
				})

			},
			// 地图定位
			select() {
				console.log(this.detailedAddress)
				// this.address = this.province+ this.city+this.district+this.address
				var addr = this.province + this.city + this.district + this.address
				let that = this
				jsonp('https://apis.map.qq.com/ws/geocoder/v1/?address==' + addr +
					'&key=ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75&get_poi=1&output=jsonp', {
						myCustomUrlParam: 'veryNice'
					}).then(response => {
					// handle success
					console.log('response', response)
					that.longitude = response.result.location.lng; // 经度
					that.latitude = response.result.location.lat; // 纬度
					// that.address = response.result.title
					that.setMap()
				}).catch(error => {
					// handle error
				}).then(() => {
					// always executed
				});
			},
			// 医院点击事件
			bindClick() {
				this.dialogFormVisible2 = true
				this.dataSelectoder()
			},
			onprogress1(event, file, fileList) {
				console.log('详情图上传进度', parseInt(event.percent))
				this.percentage1 = parseInt(event.percent)
			},
			phoneSelect() {
				this.dataSelect()
			},
			// 获取省市区
			handleChange55(value) {
				value = this.$refs['cascaderAddr'].currentLabels
				this.province = value[0]
				this.city = value[1]
				this.district = value[2]
				// this.form.city = value[1]
				if (this.city == '市辖区') {
					this.city = this.province
				}
				this.dataSelect()
			},
			handleChange() {
				this.$router.push({
					path: '/riderScheduling',
				})
			},
			dataSelect() {
				this.tableDataLoadingDt = true
				this.$http({
					url: this.$http.adornUrl('timedtask/selectAllRiderLocation'),
					method: 'get',
					params: this.$http.adornParams({
						'province': this.province,
						'city': this.city,
						'district': this.district,
						'nickName': this.nickNameT
					})
				}).then(({
					data
				}) => {
					console.log(data)
					var arr = []
					var arr1 = []
					if (data.data.riderList.length > 0) {

						for (var i in data.data.riderList) {
							if (data.data.riderList[i].userEntity) {
								if (data.data.riderList[i].lat && data.data.riderList[i].lng) {
									var obj = {}
									obj.position = new TMap.LatLng(data.data.riderList[i].lat, data.data.riderList[
										i].lng)
									obj.datas = data.data.riderList[i]
									obj.img = data.data.riderList[i].artificerImg
									obj.content = data.data.riderList[i].userEntity.nickName
									arr.push(obj)
									this.longitude = data.data.riderList[0].lng
									this.latitude = data.data.riderList[0].lat
								}
							}


						}

						this.geometries = arr
						this.tableDataLoadingDt = false
						this.setMap();

					}
					if (data.data.indentList.length > 0) {

						for (var i in data.data.indentList) {
							// if (data.data.indentList[i].userEntity) {
							if (data.data.indentList[i].shipAddressLatitude && data.data.indentList[i]
								.shipAddressLongitude) {
								var obj = {}
								obj.position = new TMap.LatLng(data.data.indentList[i].shipAddressLatitude, data
									.data.indentList[
										i].shipAddressLongitude)
								obj.datas = data.data.indentList[i]
								obj.img = data.data.indentList[i].artificerImg
								obj.content = data.data.indentList[i].shipUserName
								arr1.push(obj)
								this.longitude = data.data.indentList[0].shipAddressLongitude
								this.latitude = data.data.indentList[0].shipAddressLatitude
							}
							// }


						}

						// this.geometries = arr
						this.lists = arr1
						this.tableDataLoadingDt = false
						this.setMap();


					} else {
						this.lists = []
					}

					if (data.data.indentList.length == 0 && data.data.riderList.length == 0) {
						this.$message({
							message: '暂无数据',
							type: 'warning',
							duration: 1500,
							onClose: () => {}
						})
						this.tableDataLoadingDt = false
						this.setMap();
					}

				})
			},
			// 重置
			cleans() {
				this.nickNameT = ''
				this.province = ''
				this.city = ''
				this.district = ''
				this.storeAddress = []
				this.storeAddre = '请选择城市'
				this.dataSelect()
			},
			// 详情跳转
			updates(userId) {
				if (userId) {
					if (userId) {
						this.$router.push({
							path: '/userDetail',
							query: {
								userId: userId
							}
						})
					}
				}

			},
			// select选择事件
			animeDat(state) {
				this.page = 1
				this.dataSelectoder()
			},
			cleansDet() {
				this.page = 1
				this.type = ''
				this.userName = ''
				this.ordersNo = ''
				this.dataSelectoder()
			},

			// 获取医院订单
			dataSelectoder() {
				this.tableDataLoading = true
				this.$http({
					url: this.$http.adornUrl('artificer/selectOrdersList'),
					method: 'get',
					params: this.$http.adornParams({
						'page': this.page,
						'limit': this.limit,
						'status': 2,
						'artificerId': this.hospitalId
					})
				}).then(({
					data
				}) => {
					this.tableDataLoading = false
					let returnData = data.data;
					this.tableData = returnData

				})
			},

			// // 获取师傅订单数据
			dataSelectOrder(userId) {
				this.tableDataLoadingU = true
				this.$http({
					url: this.$http.adornUrl('adminerrand/findWaitIndent'),
					method: 'get',
					params: this.$http.adornParams({
						'page': this.page1,
						'limit': this.limit1,
						'userId': userId
					})
				}).then(({
					data
				}) => {
					this.tableDataLoadingU = false
					let returnData = data.data
					this.userData = returnData
				})
			},

			// 转单弹框
			zhuandan(row) {
				if (row.indentId) {
					this.page1 = 1
					this.ordersId = row.indentId
					this.dataSelectUser()
					this.dialogFormVisible2 = true
				} else {
					this.page1 = 1
					this.dataSelectOrder(row.userId)
					this.dialogFormVisible = true
				}

			},
			// 确认选择
			userBtns(row) {
				this.$http({
					url: this.$http.adornUrl('adminerrand/distributionOrder'),
					method: 'post',
					params: this.$http.adornParams({
						'userId': row.userId,
						'indentId': this.ordersId,
					})
				}).then(({
					data
				}) => {
					if (data.code == 0) {
						this.$message({
							message: '操作成功',
							type: 'success',
							duration: 1500,
							onClose: () => {
								this.dataSelect()
								this.dialogFormVisible2 = false
							}
						})
					} else {
						this.$message({
							message: data.msg,
							type: 'warning',
							duration: 1500,
							onClose: () => {}
						})
					}


				})
			},
			// 获取数据列表
			dataSelectUser() {
				this.tableDataLoadingU = true
				this.$http({
					url: this.$http.adornUrl('adminerrand/findAllUser'),
					method: 'get',
					params: this.$http.adornParams({
						'page': this.page1,
						'limit': this.limit1,
						// 'member': this.member,
						'phone': this.phoneU,
						'nickName': this.campus,
						'userType': 2,
						'invitationCode': '',
						'platform': ''
					})
				}).then(({
					data
				}) => {
					this.tableDataLoadingU = false
					let returnData = data.data
					this.userData = returnData
				})
			},
			// 查询
			selectU() {
				this.page = 1
				this.dataSelectUser()
			},
			// 重置
			cleansU() {
				this.page1 = 1
				this.campus = ''
				this.phoneU = ''
				this.laundryIdU = ''
				this.dataSelectUser()
			},
		},
		created() {

		},
		mounted() {
			let data = {
				key: "ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75", //申请的密钥
				output: "jsonp",
			};
			let url = "https://apis.map.qq.com/ws/location/v1/ip"
			this.$jsonp(url, data).then(res => {
				console.log('获取Ip定位成功----')
				this.longitude = res.result.location.lng
				this.latitude = res.result.location.lat
				this.setMap();
			}).catch(err => {
				this.$toast('获取Ip定位失败--', err.message)
			})
			// 
			// this.getMyLocation()
			this.dataSelect()

		}
	}
</script>

<style>
	.imgs {
		position: relative;
		border-radius: 6px;
		width: 148px;
		height: 148px;
		margin-right: 10px;
		display: inline-block;
	}

	.dels {
		position: absolute;
		top: 0;
		left: 0;
		display: none;
	}

	.dels .el-icon-delete {
		line-height: 148px;
		padding-left: 58px;
		font-size: 25px;
		color: #fff;
	}

	.imgs:hover .dels {
		width: 100%;
		height: 100%;
		background: #000;
		display: block;
		opacity: 0.5;
	}

	.bqList {
		padding: 4px 14px;
		margin: 4px;
		border: 1px solid #efefef;
		font-size: 12px;
		color: #999;
		border-radius: 4px;
		margin-right: 15px;
	}

	.delss {
		display: none;
		position: relative;
	}

	.delss .el-icon-delete {
		position: absolute;
		top: 0;
	}

	.bqList:hover .delss {
		display: initial;
		opacity: 0.5;

	}

	.tj {
		padding: 6px !important;
		margin: 4px;
		font-size: 12px;
		border: 1px solid #ccc;
		border-radius: 4px;
	}

	.csssprite {
		width: 100% !important;
		height: 100% !important;
		border-radius: 50% !important;
		min-width: 100% !important;
		max-width: 100% !important;
		min-height: 100% !important;
		max-height: 100% !important;
		border: 3px solid red !important;
	}
</style>